package com.kotle.baselib.retfofit;

import io.reactivex.Observable;
import okhttp3.OkHttpClient;

/**
 * Created by Kotle on 2017/3/28.
 * 网络请求的回调
 */

public abstract class NetRequestCall<T,P> {
    abstract protected Observable<T> getObservable(P netApi);
    protected String getBaseUrl(){
        return null;
    }
    protected boolean isSwithJavaBean(){
        return true;
    }
    protected void onStart() {
    }

    abstract protected void onNext(T t);

    protected void onCompleted() {
    }

    protected void onError(Throwable e) {

    }

    protected OkHttpClient getOkHttpClient(){
        return null;
    }
}
